package com.hrs.common.constant;

/**
 * @author 摆渡人
 * @description
 * @date 2022/12/5 22:55
 */
public class RedisConstants {
    //手机验证码key
    public static final String PHONE_CODE = "phone:code:";
    //图片验证码key
    public static final String PICTURE_CODE = "picture:code:";
    //用户缓存信息key
    public static final String LOGIN_USER_REQUEST_DATA = "login:user:data:";
    //用户id为索引保存token
    public static final String UID_TO_TOKEN = "user:token:";
    //角色对应的URL集合key
    public static final String ROLE_PRIVILEGE = "role:privilege:";
    //请求次数限制ket
    public static final String REQUEST_LIMIT = "request:limit:";

    //上锁
    public static final String LOCK = "lock:";

    //用户缓存信息过期时间
    public static final Long USER_REQUEST_DATA_TTL_DAY = 30L;

    //图片验证码过期时间/分钟
    public static final Long CACHE_IMG_CODE_TTL = 5L;

    public static final Long CACHE_NULL_TTL = 2L;

    public static final Long CACHE_SHOP_TTL = 30L;


    public static final String LOCK_SHOP_KEY = "lock:shop:";

}
